﻿@using System.Collections
@{
    ViewBag.Title = "Thống kê đơn đặt hàng";
    var listMonths = (Dictionary<int, string>)ViewData["listMonths"];
    var listStatus = (List<SuperStar.Models.StatusSelling>)ViewData["listStatus"];
}

<div class="box">
    <h2 class="head-big-title">
        <a href="#"><span>Thống kê đơn đặt hàng</span></a>
    </h2>
    <div class="sub_content">
        
        <div style="margin:0 auto;width: 740px;">
        <br/>
        @using (Html.BeginForm("BillReport", "Report", FormMethod.Post))
        { 
            <span>Thời gian từ:</span> <select name="month" onchange=" this.form.submit() ">
                                             @foreach (var item in listMonths)
                                             {
                                                 <option @(Request.Params["month"] == item.Key.ToString() ? "selected" : "")
                                                     value="@item.Key">@item.Value</option>
                                             }
                          
                                         </select>
            <span> Tình trạng hóa đơn :</span> <select name="status" onchange=" this.form.submit() ">
                                           @foreach (var item in listStatus)
                                           {
                                               <option @(Request.Params["status"] == item.Id.ToString() ? "selected" : "")
                                                   value="@item.Id">@item.Name</option>
                                           }
                                       </select>
        }
        <br/>
        @Html.Partial("ReportViewer")
        </div>
    </div>
</div>